table.insert(itemActions,
	function(item, action)
		-- WHITE weapons
		-- ItemKind.Weapon doesn't work for "any" weapon afaik
		-- too many weapon types to check against
		-- all whites pass through this func, sorry!
		if not (item.quality == ItemQuality.Superior or item.quality == ItemQuality.Normal) then
			return false
		end
		
		return processItemList(item, action, whiteWeapons)
	end
)

minWhiteWeaponED = 14 -- change this if you want
	--[[
		-1 will keep all normal and superior
		0 will keep only superior with 1+ed (it will not keep ar only superiors)
		1 will do the same (go figure)
		15 will keep only superior with 15ed
		etc.

		*this applies for MOST white weapons (noncaster)
		ofc, you can change the "minWhiteWeaponED" in a specific function to a specific value
		]]

-- see: dir .. "readme.txt" for information regarding itemLists

whiteWeapons = {
	{{"7wa", "7gd", "7cr"}, 8, false, -- Berserker Axe, Colossus Blade, Phase Blade
		function(item)
			if not (findStat(item, "Max Damage Percent") >= minWhiteWeaponED) then 
				return false
			end

			if item.flags.Ethereal and hasCertainSockets(item, "06") then
				return true
			elseif not item.flags.Ethereal and hasCertainSockets(item, "5") then
				return true
			end
		end
	},
	{{"7pa", "7vo", "7h7", "7wc"}, 7, false, -- CAxe, CVoulge, Grt.Poleaxe, Giant.Thresh
		function(item)
			if not (findStat(item, "Max Damage Percent") >= minWhiteWeaponED) then
				return false
			end

			return (
					item.flags.Ethereal and
					hasCertainSockets(item, "045")
					)
		end
	},

	{"7p7", 8, false, -- Eth War Pike
		function(item)
			-- ed doesn't matter
			return (
					item.flags.Ethereal and
					hasCertainSockets(item, "06")
                    )
		end
	},

	{"crs", 8, false, -- Crystal Sword
		function(item)
			-- ed doesn't matter
			return (
					item.flags.Ethereal and
					--hasCertainSockets(item, "06") or -- if you want eth 6ist cs :)
					hasCertainSockets(item, "5")
					)
		end
	},
	{{"amb", "amc"}, 8, false, -- Matriarchal Bow, Grand Matron Bow
		function(item)
			if not (findStat(item, "Max Damage Percent") >= minWhiteWeaponED) then
				return false
			end

			return (
					findStat(item, "Skill Tab Bonus") == 3 and
					hasCertainSockets(item, "4")
					)
		end
	},
	{ItemKind.HandToHand2, 7, false, -- "Chaos" Runeword Claws
		function(item)
			if not (findStat(item, "Max Damage Percent") >= minWhiteWeaponED) then
				return false
			end

			return (
					hasSkill(item, SkillType.LightningSentry, 3) and
					-- maybe someone wants to add more to this?
					-- I don't know much about wwsins
					hasCertainSockets(item, "03")
					)
		end
	},

    	{{"wsp", "9ws", "7ws"}, 7, false, -- War Scepter, Divine Scepter, Caduceus
		function(item)
			-- ed doesn't matter
			local conv = hasSkill(item, SkillType.Conviction, 3)
			local foh = hasSkill(item, SkillType.FistOfTheHeavens, 3)
			local shk = hasSkill(item, SkillType.HolyShock, 3)
			local hs = hasSkill(item, SkillType.HolyShield, 1)

			return (
					(hasCertainSockets(item, "045") and conv) and (foh or shk or hs)
					)
		end
	},

	{{"gst", "bst", "8cs", "8bs", "6cs", "6bs"}, 5, false, -- Energy Shield + Other Sorc Memory Staves
		function(item)
			-- ed doesn't matter
			local es = hasSkill(item, SkillType.EnergyShield, 3)
			local chant = hasSkill(item, SkillType.Enchant, 3)
			local meteor = hasSkill(item, SkillType.Meteor, 3)
			local fm = hasSkill(item, SkillType.FireMastery, 3)
			local cm = hasSkill(item, SkillType.ColdMastery, 3)
			local lm = hasSkill(item, SkillType.LightningMastery, 3)
			local ca = hasSkill(item, SkillType.ChillingArmor, 3)
		
			return (
					es and hasCertainSockets(item, "04") or
					(chant or meteor or fm or cm or lm or ca) and hasCertainSockets(item, "04") 
					)
		end
	},

	{{"bwn", "gwn", "9yw", "9bw", "9gw",
		"7wn", "7yw", "7bw", "7gw"}, 7, false, -- "White" Runeword Wands
		function(item)
			-- ed doesn't matter
			local spirit = hasSkill(item, SkillType.BoneSpirit, 3)
			local spear = hasSkill(item, SkillType.BoneSpear, 3)
			
			return (
					(spirit or spear) and
					hasCertainSockets(item, "02")
					)
		end
	},
	--{"", 8, false},
}